package com.example.jqying.androiddemo.recyclerView.activity;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.example.jqying.androiddemo.R;

public class RecyclerViewActivity extends AppCompatActivity {


    private Button mBtnLinear;
    private Button mBtnHorizontal;
    private Button mBtnGrid;
    private Button mWaterfall;
    private Button mViewHolder;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_recycler);




        mBtnLinear = (Button) findViewById(R.id.btn_liner);
        mBtnLinear.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(RecyclerViewActivity.this,LinearRecyclerViewActivity.class);
                startActivity(intent);
            }
        });



        mBtnHorizontal = (Button) findViewById(R.id.btn_horizontal);
        mBtnHorizontal.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(RecyclerViewActivity.this,HorizontalRecyclerViewActivity.class);
                startActivity(intent);
            }
        });

        mBtnGrid = (Button) findViewById(R.id.btn_grid);
        mBtnGrid.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(RecyclerViewActivity.this,GridRecyclerActivity.class);
                startActivity(intent);
            }
        });

        mWaterfall = (Button) findViewById(R.id.btn_waterfall);
        mWaterfall.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(RecyclerViewActivity.this,WaterfallRecyclerActivity.class);
                startActivity(intent);
            }
        });

        mViewHolder = (Button) findViewById(R.id.btn_viewHolder);
        mViewHolder.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(RecyclerViewActivity.this,ViewHolderActivity.class);
                startActivity(intent);
            }
        });
    }
}
